package com.cvpoc.displaytag.decorator;

import java.util.List;

import javax.servlet.jsp.PageContext;

import org.displaytag.decorator.TableDecorator;
import org.displaytag.model.HeaderCell;
import org.displaytag.model.TableModel;

public class FormationInitiale extends TableDecorator {
	@SuppressWarnings("unchecked")
	@Override
	public void init(PageContext pageContext, Object decorated,
			TableModel tableModel) {
//		tableModel.addColumnHeader(new HeaderCell());
		// HeaderCell oneHeader;
		List<HeaderCell> headersList = tableModel.getHeaderCellList();
		((HeaderCell) headersList.get(3)).getHeaderAttributes().put("colspan",
				"2");
		((HeaderCell)tableModel.getHeaderCellList().get(4)).addHeaderClass("hiddenElement");
		
		// for (int i = 0; i < headersList.size(); i++) {
		// oneHeader = ;
		// HtmlAttributeMap oneHtmlAttributeMap = oneHeader
		// .getHeaderAttributes();
		// oneHtmlAttributeMap.put("colSpan", "3");
		// oneHeader.setHtmlAttributes(oneHtmlAttributeMap);
		// }
	}
}
